home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility3 / jfklib.zip / DLGTEMP.HPP < prev    next >
C/C++ Source or Header  |  1991-05-09  |  2KB  |  105 lines

  1. /*
  2.     DLGTEMP.HPP - Generic DialogBox-Class
  3.     (C) 1991 by Joachim Kainz 'On a mission from Bhudda'
  4. */
  5.     #if !defined (__DLGTEMP_HPP)
  6.     #define __DLGTEMP_HPP 1
  7.  
  8.     #include "jfklib.hpp"
  9.  
  10.     class DLGITEMTEMPLATE {
  11.  
  12.       private:
  13.         int        x,
  14.                 y,
  15.                 cx,
  16.                 cy,
  17.                 nID;
  18.         long    lStyle;
  19.         LPSTR    lpClass,
  20.                 lpText;
  21.         BYTE    byInfo;
  22.         PSTR    pData;
  23.  
  24.         LPSTR GetCtlClass (LPSTR &lpDlg                 );
  25.         BOOL  CopyDlgItem (const DLGITEMTEMPLATE &dit);
  26.  
  27.         BOOL Reset ();
  28.  
  29.       public:
  30.         EXPORT ~DLGITEMTEMPLATE (                           );
  31.         EXPORT DLGITEMTEMPLATE (                           );
  32.         EXPORT DLGITEMTEMPLATE (const DLGITEMTEMPLATE &dit);
  33.  
  34.         DLGITEMTEMPLATE EXPORT operator = (const DLGITEMTEMPLATE &dit);
  35.  
  36.         WORD    EXPORT GetSize ();
  37.  
  38.         BOOL    EXPORT ConvertResource    (LPSTR &lpDlg);
  39.         BOOL    EXPORT MakeResource    ( PSTR & pDlg);
  40.  
  41.         long    EXPORT Style      () { return lStyle;    }
  42.         BYTE    EXPORT Info      () { return byInfo;    }
  43.         int        EXPORT X          () { return x;        }
  44.         int        EXPORT Y          () { return y;        }
  45.         int        EXPORT Width      () { return cx;        }
  46.         int        EXPORT Height      () { return cy;        }
  47.         int        EXPORT ID          () { return nID;        }
  48.         PSTR    EXPORT Data      () { return pData;    }
  49.         LPSTR    EXPORT Class      () { return lpClass;    }
  50.         LPSTR    EXPORT Text      () { return lpText;    }
  51.     };
  52.  
  53.     typedef DLGITEMTEMPLATE near * PDLGITEMTEMPLATE;
  54.  
  55.     class DLGTEMPLATE {
  56.  
  57.       private:
  58.         BOOL             bValid;
  59.         PDLGITEMTEMPLATE pdtit;
  60.  
  61.         long    lStyle;
  62.         BYTE    byItemCount;
  63.         int        x,
  64.                 y,
  65.                 cx,
  66.                 cy;
  67.         LPSTR    lpMenuName,
  68.                 lpClassName,
  69.                 lpCaptionText;
  70.  
  71.         struct {
  72.  
  73.             int        nSize;
  74.             LPSTR    lpFaceName;
  75.  
  76.         } font;
  77.  
  78.       public:
  79.         EXPORT ~DLGTEMPLATE (            );
  80.         EXPORT DLGTEMPLATE (LPSTR lpDlg);
  81.  
  82.         DLGITEMTEMPLATE EXPORT operator []   (WORD wItem);
  83.                         EXPORT operator PSTR ();
  84.  
  85.         BOOL    EXPORT IsValid   () { return bValid;            }
  86.         long    EXPORT Style      () { return lStyle;            }
  87.         BYTE    EXPORT ItemCount () { return byItemCount;        }
  88.         int        EXPORT X          () { return x;                }
  89.         int        EXPORT Y          () { return y;                }
  90.         int        EXPORT Width      () { return cx;                }
  91.         int        EXPORT Height      () { return cy;                }
  92.         LPSTR    EXPORT MenuName  () { return lpMenuName;        }
  93.         LPSTR    EXPORT ClassName () { return lpClassName;        }
  94.         LPSTR    EXPORT Caption      () { return lpCaptionText;    }
  95.         int        EXPORT FontSize  () { return font.nSize;        }
  96.         LPSTR    EXPORT FontName  () { return font.lpFaceName;    }
  97.  
  98.         BOOL EXPORT SetClass (LPSTR lpNewClsName);
  99.  
  100.         WORD EXPORT GetSize ();
  101.  
  102.     };
  103.  
  104.     #endif
  105.